<div id="hp_intro">
	<%= @page_title %>
</div>
<p>

<% form_for(@color_scheme) do |f| %>

  	<%= f.error_messages %>
	
	<div class="field">
		<div class="heading"><%= t('color_schemes.new.font.name')%></div>
		<div class="field_box">
			<%= f.text_field :fonts %>
		</div>
	</div>
	
	<div class="heading"><%= t('color_schemes.new.page.name')%></div>

	<table border="0" cellspacing="0" cellpadding="0">
		<tr><td valign="top">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :background, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_background", :color => @color_scheme.background } %></td>	
					<td><%= t('color_schemes.new.page.background')%></td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :link, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_link", :color => @color_scheme.link} %></td>	
					<td><%= t('color_schemes.new.page.links')%></td>
				</tr>
			</table>			
		
		</td><td valign="top" style="padding-left:15px;">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :main, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_main", :color => @color_scheme.main} %></td>	
					<td><%= t('color_schemes.new.page.main')%></td>
				
				</tr>
			</table>

			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :text, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_text", :color => @color_scheme.text} %></td>	
					<td><%= t('color_schemes.new.text')%></td>
				
				</tr>
			</table>

		</td><td valign="top" style="padding-left:15px;">

			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :box, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_box", :color => @color_scheme.box } %></td>	
					<td><%= t('color_schemes.new.page.boxes')%></td>
				</tr>
			</table>

			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :box_text, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_box_text", :color => @color_scheme.box_text } %></td>	
					<td><%= t('color_schemes.new.text')%></td>
				</tr>
			</table>

		</td><td valign="top" style="padding-left:15px;">

			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :comments, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_comments", :color => @color_scheme.comments } %></td>	
					<td><%= t('color_schemes.new.page.comments')%></td>
				</tr>
			</table>

			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :comments_text, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_comments_text", :color => @color_scheme.comments_text } %></td>	
					<td><%= t('color_schemes.new.text')%></td>
				</tr>
			</table>

		</td>
		
		<td valign="top" style="padding-left:15px;">

			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :footer, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_footer", :color => @color_scheme.footer} %></td>	
					<td><%= t('color_schemes.new.page.footer')%></td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :footer_text, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_footer_text", :color => @color_scheme.footer_text} %></td>
					<td><%= t('color_schemes.new.text')%></td>	
				</tr>
			</table>

		</td>		
		<td valign="top" style="padding-left:15px;">

			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :heading, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_heading", :color => @color_scheme.heading} %></td>	
					<td><%= t('color_schemes.new.page.headings')%></td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :sub_heading, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_sub_heading", :color => @color_scheme.sub_heading} %></td>
					<td><%= t('color_schemes.new.page.subheadings')%></td>	
				</tr>
			</table>

		</td>
		</tr>
	</table>	

	<p>
	<div class="heading"><%= t('color_schemes.new.toolbar.name')%></div>

	<table border="0" cellspacing="0" cellpadding="0">
		<tr><td valign="top">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :nav_background, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_nav_background", :color => @color_scheme.nav_background } %></td>	
					<td><%= t('color_schemes.new.toolbar.color')%></td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :nav_text, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_nav_text", :color => @color_scheme.nav_text } %></td>	
					<td><%= t('color_schemes.new.text')%></td>
				</tr>
			</table>			
		</td><td valign="top" style="padding-left: 15px;">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :nav_selected_background, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_nav_selected_background", :color => @color_scheme.nav_selected_background} %></td>
					<td><%= t('color_schemes.new.toolbar.selected')%></td>	
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :nav_selected_text, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_nav_selected_text", :color => @color_scheme.nav_selected_text} %></td>	
					<td><%= t('color_schemes.new.text')%></td>
				</tr>
			</table>
		</td><td valign="top" style="padding-left: 15px;">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :nav_hover_background, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_nav_hover_background", :color => @color_scheme.nav_hover_background} %></td>	
					<td><%= t('color_schemes.new.toolbar.hovering')%></td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :nav_hover_text, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_nav_hover_text", :color => @color_scheme.nav_hover_text} %></td>	
					<td><%= t('color_schemes.new.text')%></td>
				</tr>
			</table>
		</td>		
		</tr>
	</table>

	<p>
	
	<div class="heading"><%= t('color_schemes.new.buttons.name')%></div>
	
	<table border="0" cellspacing="0" cellpadding="0">

		<tr><td valign="top">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :action_button, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_action_button", :color => @color_scheme.action_button } %></td>	
					<td><%= t('color_schemes.new.buttons.primary_action')%></td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :action_button_border, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_action_button_border", :color => @color_scheme.action_button_border } %></td>	
					<td><%= t('color_schemes.new.buttons.border')%></td>
				</tr>
			</table>			
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :action_button_text, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_action_button_text", :color => @color_scheme.action_button_text} %></td>	
					<td><%= t('color_schemes.new.text')%></td>
				</tr>
			</table>			
		</td><td valign="top" style="padding-left: 15px;">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :grey_button, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_grey_button", :color => @color_scheme.grey_button} %></td>
					<td><%= t('color_schemes.new.buttons.secondary_action')%></td>	
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :grey_button_border, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_grey_button_border", :color => @color_scheme.grey_button_border} %></td>	
					<td><%= t('color_schemes.new.buttons.border')%></td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :grey_button_text, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_grey_button_text", :color => @color_scheme.grey_button_text} %></td>	
					<td><%= t('color_schemes.new.text')%></td>
				</tr>
			</table>			
		</td><td valign="top" style="padding-left: 15px;">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :endorsed_button, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_endorsed_button", :color => @color_scheme.endorsed_button } %></td>
					<td><%= t('color_schemes.new.buttons.endorsed')%></td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :endorsed_button_text, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_endorsed_button_text", :color => @color_scheme.endorsed_button_text } %></td>	
					<td><%= t('color_schemes.new.text')%></td>
				</tr>
			</table>			
		</td><td valign="top" style="padding-left: 15px;">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :compromised_button, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_compromised_button", :color => @color_scheme.compromised_button} %></td>
					<td><%= t('color_schemes.new.buttons.compromised')%></td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :compromised_button_text, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_compromised_button_text", :color => @color_scheme.compromised_button_text} %></td>	
					<td><%= t('color_schemes.new.text')%></td>
				</tr>
			</table>
		</td><td valign="top" style="padding-left: 15px;">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :opposed_button, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_opposed_button", :color => @color_scheme.opposed_button} %></td>	
					<td><%= t('color_schemes.new.buttons.opposed')%></td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :opposed_button_text, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_opposed_button_text", :color => @color_scheme.opposed_button_text} %></td>
					<td><%= t('color_schemes.new.text')%></td>	
				</tr>
			</table>
		</td>
		</tr>
	</table>	
	<p>
	<div class="heading"><%= t('color_schemes.new.misc.name')%></div>
	
	<table border="0" cellspacing="0" cellpadding="0">
		<tr><td valign="top">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :up, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_up", :color => @color_scheme.up } %></td>	
					<td><%= t('color_schemes.new.misc.rising')%></td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :down, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_down", :color => @color_scheme.down } %></td>	
					<td><%= t('color_schemes.new.misc.falling')%></td>
				</tr>
			</table>			
		</td><td valign="top" style="padding-left:15px;">

			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :input, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_input", :color => @color_scheme.input} %></td>	
					<td><%= t('color_schemes.new.misc.input_boxes')%></td>
				</tr>
			</table>
			
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :border, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_border", :color => @color_scheme.border} %></td>	
					<td><%= t('color_schemes.new.buttons.border')%></td>
				</tr>
			</table>
		</td><td valign="top" style="padding-left:15px;">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :error, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_error", :color => @color_scheme.error} %></td>	
					<td><%= t('color_schemes.new.misc.errors')%></td>
				</tr>
			</table>
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :error_text, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_error_text", :color => @color_scheme.error_text} %></td>	
					<td><%= t('color_schemes.new.text')%></td>
				</tr>
			</table>
		</td><td valign="top" style="padding-left:15px;">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td><%= f.hidden_field :greyed_out, :size => 6, :class => "color_picker" %></td>
					<td width="38"><%= render :partial => "color_schemes/picker", :locals => {:name => "color_scheme_greyed_out", :color => @color_scheme.greyed_out} %></td>	
					<td><%= t('color_schemes.new.misc.inactive')%></td>
				</tr>
			</table>
			<td>
		</tr>
	</table>
	
  <p>
    <%= f.submit t('color_schemes.new.submit'), :class => "yellow_button" %>
  </p>
<% end %>

<%= observe_form 'new_color_scheme',  :frequency => 0.5, :update => 'color_scheme_'+current_government.color_scheme_id.to_s, :url => preview_color_schemes_url %>
